package com.hanter.android.radui.mvp;

import android.content.Context;

import androidx.annotation.IntDef;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

public interface PageView {

    @Retention(RetentionPolicy.SOURCE)
    @IntDef({PAGE_STATE_LOADING, PAGE_STATE_CONTENT, PAGE_STATE_EXCEPTION})
    @interface State {}

    int PAGE_STATE_LOADING = 0;
    int PAGE_STATE_CONTENT = 1;
    int PAGE_STATE_EXCEPTION = 2;

    String PAGE_ERROR = "Error";
    String PAGE_ERROR_NO_DATA = "NoData";
    String PAGE_ERROR_OFFLINE = "Offline";

    String TAG_LOADING_DIALOG = "loadingDialog";

    Context getContext();

    /**
     * 显示加载框的dialog
     */
    void showProgressDialog();

    /**
     * 关闭加载的dialog
     */
    void disProgressDialog();

    void showPageView(int state);

    void navBack();

}
